<?php
class Mnews extends CI_Model{

    public function __construct(){
        parent::__construct();        
        $this->load->database();
    }
    public function listall(){
    	$this->db->cache_on();
        $query=$this->db->get("news_content");
        return $query->result_array();
    }

    public function updateListEmployersByID($parram){    	
    	try{         
            $this->db->where('id', $parram["id"]);
    		$this->db->update("employers", $parram);	
			return 0;
    	}catch(Exception $e){
 			throw new Exception();
 			return 1;
    	}
		
    }

    public function getListEmployersByID($parram){
        try{
            $this->db->where('id', $parram);
            $query=$this->db->get("employers");
            return $query->result_array();
        }catch(Exception $e){
            throw new Exception();            
        }
    }

}